1. Field of the Invention
This invention pertains in general to a method for displaying or providing an antialiased image and, more particularly, to a pre-filtering method for generating an antialiased image in a device having a matrix array of pixels.
2. Description of the Related Art
In applications that provide a display or output as a plurality of pixels arranged in a predetermined pattern, such as in computer graphics, copiers and printers, the displayed image often appears "jagged" or stepped" around the contour or boundary lines. This is known as aliasing. Since the pixels in these applications are arranged in a matrix, when an output, for example, a line, is horizontal or vertical, the line is displayed by a row or column of pixels, respectively, that the line coincides with. The displayed line appears as a smooth straight line. However, when the output line is near, but not coincident with, the horizontal or vertical direction, the pixel-displayed line is approximated by a series of pixels because many parts of the line do not overlie any pixel. As a result, the displayed line exhibits "jaggies" or a stair step appearance. Conventionally, several antialiasing techniques are employed to remove the "jaggies" and reduce the effect of aliasing. The techniques may be divided into pre-filtering and post-filtering techniques.
Pre-filtering techniques are those implemented before pixel sampling. Each pixel is treated as an area, and pixel intensity is computed based on the overlap of an object to be displayed with a pixel's area. Pre-filering techniques may be further divided into unweighted area sampling and weighted area sampling. Unweighted area sampling, effected by means such as a box filter, sets pixel intensity in proportion to the amount of pixel area covered. Weighted area sampling determines pixel intensity based on the distance between the displayed object to the center of the pixel with reference to a weighted function. One filter that uses such a weighting function is a cone filter. Post-filtering, meanwhile, also known as supersampling, takes several samples and computes an average of the samples to determine each pixel's intensity.
Filters that are used to either provide pre-filtering or post-filtering are controlled by filter functions which represent distribution of light emitting areas for each pixel. Filter function, therefore, may provide an effective quantized formula to calculate the "image point," and is obtained through mathematical implementations and revisions until an acceptable image point is found. In an unweighted filter, each data or image sample has equal influence in determining the pixel's intensity. In other words, an unweighted filter computes an unweighted average. In contrast, a weighted filter provides the weights used to compute the average wherein each data sample is multiplied by its corresponding "weight" and the products are summed to produce a weighted average. This weighted average is used as the pixel intensity.
As described above, weighted pre-filtering determines pixel intensity proportional to distance, and the relationship may be expressed as follows : EQU P.sub.I =F.sub.r (p, t)*I.sub.max
where P.sub.I is the display intensity of the pixel, and I.sub.max is the maximum pixel intensity. F.sub.r represents a variable filter function according to the filter radius, r, and p is the normal distance from the pixel center to the center of the displayed line. Additionally, t represents the width of the displayed line. Conventionally, the center-to-center distance between two neighboring pixels is considered a unit distance. FIG. 1 shows a conical filter function having a radius equal to one. A conical function has a maximum value at the center, and the value decreases linearly away from the center. Referring to FIG. 1, when a straight line passes through the pixel, its intensity is proportional to the volume of the cone intersecting the line.
Even though the conical filter as shown in FIG. 1 generally provides acceptable displays, there are a number of calculations required to obtain display pixel intensity and generally a look-up table stored in a read-only-memory ("ROM") is also required to implement the conical filter. These factors, in turn, decrease the speed with which an image can be generated for display.